/**
 * Student Name: Thong, Wang Kit Wilson (50419704)
 *               Yin, Xing (51590277)
 */
#ifndef SQL_LOG_H
#define SQL_LOG_H
#include "BookCourtSystem.h"
#include "sqlite-amalgamation-3_6_22/sqlite3.h"

/**
 * All write commands for this book court system
 */
enum WriteCommandType_t {
	BookCourtComm = 0,
	CancelCourtComm = 1
};
typedef enum WriteCommandType_t WriteCommandType_t;

/**
 * Save the message into the FIFO log
 */
extern ReturnType_t LogEnqueueMessage (sqlite3* db, int studentId, WriteCommandType_t comm, void* arg, int argsSize);
/**
 * Read the first logged message
 */
extern ReturnType_t LogReadHeadMessage (sqlite3* db, int studentId, WriteCommandType_t* comm, void** arg);
/**
 * Remove the first logged message. 
 */
extern ReturnType_t LogDequeueMessage (sqlite3* db, int studentId);

#endif
